<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>Image</title>
    <script type="text/javascript" src="esl.js"></script>
</head>
<body>
    <script type="text/javascript">
    require.config({
        packages: [
            {
                name: 'zrender',
                location: '../src',
                main: 'zrender'
            }
        ]
    });

    require(['zrender', 'zrender/graphic/Image'], function(zrender, ImageShape){
        // 初始化zrender
        var zr = zrender.init( document.getElementById('main') );

        for( var i = 0; i < 20; i ++){
            for( var j = 0; j < 20; j++){
                var image = new ImageShape({
                    position: [i * 50, j * 50],
                    scale: [1, 1],
                    style: {
                        x: 0,
                        y: 0,
                        image: 'test.jpeg',
                        width: 50,
                        height: 50
                    },
                    draggable: true
                });
                zr.add( image );
            }
        }


    })
    </script>
    <canvas id="main" style="width:1000px;height:600px;"></canvas>
</body>
</html>